package com.apptude.android.trivial.draw2d;

import android.app.Activity;
import android.os.Bundle;

public class Draw2d extends Activity {
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        if (backgroundThread == null) {
        	backgroundThread = new BackgroundThread();
        }
    }

	@Override
	protected void onRestart() {
		// TODO Auto-generated method stub
		super.onRestart();
	}

	@Override
	protected void onStart() {
		super.onStart();
	}
	
	@Override
	protected void onResume() {
		super.onResume();
		
		backgroundThread.startRunning();
	}

	@Override
	protected void onPause() {
		super.onPause();
		backgroundThread.stopRunning();
	}

	@Override
	protected void onStop() {
		super.onStop();
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}
    
    private BackgroundThread backgroundThread;
}